﻿CREATE TABLE [dbo].[VokzalTable] (
    [id]                INT           IDENTITY (1, 1) NOT NULL,
    [datedoc]           DATETIME      NOT NULL,
    [numdoc]            NVARCHAR(MAX) NOT NULL,
    [id_routelist]      INT           NOT NULL,
    [id_route]          INT           NOT NULL,
    [time_departure]    NVARCHAR (10) NOT NULL,
    [qnt_tickets]       INT           NOT NULL,
    [summa_tickets]     REAL          NOT NULL,
    [bagazh]            REAL          NOT NULL,
    [qnt_lgot_ticket]   INT           NOT NULL,
    [summ_lgot_ticket]  REAL          NOT NULL,
    [qnt_child_ticket]  INT           NOT NULL,
    [summ_child_ticket] REAL          NOT NULL,
    [summ_free_ticket]  REAL          NOT NULL,
	[sum_insurance]		REAL		  NOT NULL DEFAULT 0,
	[del]   bit            NULL,
	[id_station]		INT			 NULL
    PRIMARY KEY CLUSTERED ([id] ASC) WITH (ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF)
);

